<!DOCTYPE html>
<html>
	<head>
		<title>Installing <?php echo TITLE; ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link rel="stylesheet" href="<?php echo WEB; ?>fw/management/style/main.css"/>
	</head>
	<body>
		<div id="page">
			<div id="header">
				<h1>Installing <?php echo TITLE; ?></h1>
				<p>version <?php echo VERSION; ?> by Sourcehat</p>
			</div>
			<form method="post" action="">
				<table>
					<tr class="top">
						<td></td>
						<td colspan="2" class="title">Database settings</td>
					</tr>
					<tr>
						<td class="label">Adapter</td>
						<td class="input">
							<select name="adapter">
								<option value="MySQL">MySQL</option>
							</select>
						</td>
						<td class="error"><?php if(isset($errors['adapter'])) echo $errors['adapter']; ?></td>
					</tr>
					<tr>
						<td class="label">Host</td>
						<td class="input">
							<input type="text" name="host" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['host']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['host'])) echo $errors['host']; ?></td>
					</tr>
					<tr>
						<td class="label">User</td>
						<td class="input">
							<input type="text" name="user" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['user']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['user'])) echo $errors['user']; ?></td>
					</tr>
					<tr>
						<td class="label">Password</td>
						<td class="input">
							<input type="password" name="pass" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['pass']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['pass'])) echo $errors['pass']; ?></td>
					</tr>
					<tr>
						<td class="label">Database</td>
						<td class="input">
							<input type="text" name="database" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['database']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['database'])) echo $errors['database']; ?></td>
					</tr>
					<tr>
						<td class="label">Table prefix</td>
						<td class="input">
							<input type="text" name="prefix" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['prefix']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['prefix'])) echo $errors['prefix']; ?></td>
					</tr>
					<tr>
						<td></td>
						<td colspan="2" class="title">Admin account</td>
					</tr>
					<tr>
						<td class="label">Username</td>
						<td class="input">
							<input type="text" name="username" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['username']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['username'])) echo $errors['username']; ?></td>
					</tr>
					<tr>
						<td class="label">Password</td>
						<td class="input">
							<input type="password" name="password" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['password']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['password'])) echo $errors['password']; ?></td>
					</tr>
					<tr>
						<td class="label">Repeat</td>
						<td class="input">
							<input type="password" name="repeat" value="<?php if(isset($_POST['install'])) echo htmlentities(utf8_decode($_POST['repeat']), ENT_QUOTES); ?>"/>
						</td>
						<td class="error"><?php if(isset($errors['repeat'])) echo $errors['repeat']; ?></td>
					</tr>
					<tr>
						<td></td>
						<td colspan="2" class="submit">
							<input class="button" type="submit" name="install" value="Install"/>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>